Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 2187 Bits Exchanged solution in cpp

 

uri 2187 solution in cpp

by ujjal roy




#include<bits/stdc++.h>

using namespace std;

main()

{

    int i;

   for(i=1;1;i++)

   {

        int a=0,b=0,c=0,d=0,v;

        cin>>v;

        if(v==0) break;

        a=v/50;

        v=v%50;

        b=v/10;

        v=v%10;

        c=v/5;

        v=v%5;

        cout<<"Teste "<<i<<endl;

        cout<<a<<" "<<b<<" "<<c<<" "<<v<<endl;

        cout<<endl;

   }



    return 0;

}


Post a Comment

0 Comments